<!DOCTYPE html>
<html lang="en">
<head th:include="certificateWeb/headFoot :: headerCss">
</head>
<script>
    var _hmt = _hmt || [];
    (function() {
        var hm = document.createElement("script");
        hm.src = "https://hm.baidu.com/hm.js?093a8c24001a87f3d24cf2f6c52cd2e4";
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(hm, s);
    })();
</script>
<!--<link href="/css/web/themes/about.css" rendpointel="stylesheet">-->
<link rel="stylesheet" href="/css/certificateWeb/homepage/homepage.css">
<style>
     .firstLine{
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
</style>
<body id="body">
<div th:include="certificateWeb/headFoot :: header"></div>

<main id="main">
    <section class="se_1">
        <!--  轮播图  -->
        <div class="row  justify-content-md-center" style="width: 1200px;margin: 0 auto;">
            <div class="layui-carousel" id="banner" lay-filter="banner">
                <div carousel-item=""></div>
            </div>
        </div>
    </section>
<!--    &lt;!&ndash; 公告 &ndash;&gt;-->
<!--    <section class="se_1">-->
<!--    <div style="margin: 20px 0;border-bottom: 1px solid #efefef;">-->
<!--        <ul>-->
<!--            <div class="kctit" style="float: left"><span>通知公告：</span></div>-->
<!--            <div style="float: left" class="layui-carousel" id="tz" lay-filter="tz">-->
<!--                <div carousel-item="" id="tzc">-->

<!--                </div>-->
<!--            </div>-->
<!--            <div class="clear"></div>-->
<!--        </ul>-->
<!--    </div>-->
<!--    </section>-->
    <section class="se_1">

        <div class="title"><label>信息查询11111111111111</label></div>
        <ul class="certificate">
            <li>
                <div   target="_blank">职业技能等级证书11111111111111<font>证书查询</font></div>
                <a href="/certificate/certificateQuery" class="in">进入</a>
            </li>
            <li>
                <div class="xt"  target="_blank">职业技能等级证书11111111111<font>成绩查询</font></div>
                <a href="/certificate/gradeQuery" class="in">进入</a>
            </li>
            <li>
                <div class="xt"  target="_blank">职业技能等级证书<font>考点查询</font></div>
                <a href="/certificate/testingCentreQuery" class="in">进入</a>
            </li>
            <li>
                <div class="xt"  target="_blank">职业技能等级证书<font>专家查询</font></div>
                <a href="/certificate/expertQuery" class="in noin">进入</a>
            </li>
        </ul>
    </section>
    <section class="se_1">
        <div class="title"><label>政策信息</label><a href="/certificate/policyInfo" class="more">MORE</a></div>
        <div class="layui-row">
            <div class="left">
                <div class="box" id="zc">
                </div>
            </div>
            <div class="right">
                <div class="layui-carousel" id="new">
                    <div carousel-item id="zc_image">
                    </div>
                </div>
            </div>
        </div>
    </section>
    <section class="se_1">
        <div class="title"><label>通知公告</label><a href="/certificate/noticeInfo" class="more">MORE</a></div>
        <div class="layui-row">
            <div class="left">
                <div class="box" id="tz">
                </div>
            </div>
            <div class="right">
                <div class="layui-carousel" id="new1">
                    <div carousel-item>
                        <div  th:each="tz:${consultations}">
                            <a  th:href="@{'/certificate/policyDetail?id='+${tz.id}}">
                                <img th:src="${tz.thumbnail}">
                                <p><label style="margin-bottom: 28px" th:text="${tz.title}"></label></p>
                            </a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>

    <section class="se_1">
        <div class="title"><label>试点院校风采</label><a href="/certificate/schoolMien" class="more">MORE</a></div>
        <div class="layui-row">
            <div class="left">
                <div class="box" id="fc">
                </div>
            </div>
            <div class="right">
                <div class="layui-carousel" id="new3">
                    <div carousel-item>
                        <div  th:each="tz:${consultations}">
                            <a  th:href="@{'/certificate/policyDetail?id='+${tz.id}}">
                                <img th:src="${tz.thumbnail}">
                                <p><label style="margin-bottom: 28px" th:text="${tz.title}"></label></p>
                            </a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>

    <section class="se_1">
        <div class="title"><label>工作动态</label><a href="/certificate/tradeInfo" class="more">MORE</a></div>
        <div class="layui-row">
            <div class="left">
                <div class="box" id="gz">
                </div>
            </div>
            <div class="right">
                <div class="layui-carousel" id="new2">
                    <div carousel-item>
                        <div  th:each="tz:${consultations}">
                            <a  th:href="@{'/certificate/policyDetail?id='+${tz.id}}">
                                <img th:src="${tz.thumbnail}">
                                <p><label style="margin-bottom: 28px" th:text="${tz.title}"></label></p>
                            </a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>

    <section class="se_1">
        <div class="title"><label>招聘信息</label><a href="/cultivate/getRecruit" target="_blank" class="more">MORE</a></div>
        <div class="layui-row">
                <div id="job" style="width: 1200px;">
                </div>
        </div>
    </section>
    <section class="se_1">
        <div class="title"><label>相关入口</label></div>
        <ul class="inser">
            <li>
                <a href="/certificate/selectBatch" class="bm"  target="_blank"></a>
            </li>
            <li>
                <a href="/login" class="kw"  target="_blank"></a>
            </li>
            <li>
                <a href="https://peixun.jz1x.com/" class="px"   target="_blank"></a>
            </li>
            <li id="ks"></li>
        </ul>
    </section>
</main>
<div th:include="certificateWeb/headFoot :: footer"></div>
</body>
<script src="/lib/jquery/jquery.min.js"></script>
<script>
    $(function () {
        $.ajax({
            url: "/jzApi/recruitment/selJobList",
            type: 'GET',
            data: {
                name: '',
                type:0,
                number: 5,
                current: 1
            },
            success: function (res) {
                if(res.data.pages==0){
                    $("#job").html('<div class="noData">暂无数据</div>');
                }else{
                    var list = res.data.records;
                    var job = '';
                    list.forEach(function (item, index) {
                        job+='<ul  style="height: 90px;border: 1px #dcdcdc dashed;width: 580px;float: left;margin-right: 15px">'+
                            '<li style="width:100%;height: 85px">' +
                            '<a href="/cultivate/recruitInfo?id='+item.id+'" target="_blank">' +
                            '<div style="text-align: center;float: left;margin-right: 10px"><img style="width:80px;height:85px;" src="'+item.thumbnail+'" alt="图片"></div>' +
                            '<div style="float: left;width:255px;">' +
                            '<span class="firstLine" style="width:255px;display:inline-block;margin:5px auto;font-size: 20px;font-weight: bold;">'+item.name+'</span>' +
                            '<span class="firstLine" style="width:255px;display:inline-block;margin:5px auto;font-size: 14px;color: #666666">'+item.address+'/'+item.workExperience+'/'+item.education+'</span>' +
                            '</div>' +
                            '<div style="float: left;width: 225px">' +
                            '<span class="firstLine" style="width:100%;display:inline-block;margin:5px auto;font-size: 16px;">'+item.orgName+'</span>' +
                            '<span class="firstLine" style="color:#ff552e;font-weight:bold;width:100%;display:inline-block;margin:5px auto;font-size: 18px;">'+item.salaryRange+'</span>' +
                            '</div>' +
                            '</a>' +
                            '</li><div style="clear: both"></div></ul>'
                    });
                    $("#job").html(job);
                }
            }
        });
        $.ajax({
            url: "/jzApi/index/selNewsList",
            type: 'GET',
            data: {
                firstColumn:'证书考试门户',
                columnName: '考试须知',
                current: 1,
                number:1
            },
            success: function (res) {
                if(res.data.pages==0){
                    $("#news").html('<div class="noData">暂无数据</div>');
                }else{
                    var list = res.data.records;
                    var news = '';
                    list.forEach(function (item, index) {
                        news+='<a href="'+ item.files + '" class="xz"  target="_blank"></a>'
                    });
                    $("#ks").html(news);
                }
            }
        });
        //成绩查询
        $("#find").click(function () {
            $.ajax({
                type: "get",
                url: '/certificate/gradeQuery',
                success: function (r) {
                    if (r.code == 10000) {
                        location.href = '/certificate/loginWeb';
                    } else {
                        location.href = '/certificate/gradeQuery ';
                    }
                }
            })
        })
    });
    //banner轮播
    layui.use(['carousel', 'form'], function () {
        var carousel = layui.carousel;
        $.ajax({
            url: "/jzApi/index/selBanners",
            type: 'GET',
            success: function (res) {
                var list = res.data;
                var banners = '';
                list.forEach(function (item, index) {
                    banners += '<div><img src="' + item.value + '" style="height:400px;margin:auto"></div>';
                });
                $("#banner").children('div').html(banners);
                var ins = carousel.render({
                    elem: '#banner',
                    arrow: 'always',
                    width: '100%', //设置容器宽度
                    height: '400px',
                    anim: 'fade' //轮播切换动画方式
                });
                ins.reload({elem: '#banner'});
            }
        });
        //通知列表
        $.ajax({
            url: "/jzApi/index/selNewsList",
            type: 'GET',
            data: {
                firstColumn: '培训就业门户',
                columnName: '通知公告',
                current: 1,
                number: 5
            },
            success: function (res) {
                if (res.data.pages == 0) {
                    $("#news").html('<div class="noData">暂无数据</div>');
                } else {
                    var list = res.data.records;
                    var news = '';
                    list.forEach(function (item, index) {
                        news += '<li class="clone" style="background: #fff">' +
                            '<a href="/notice/newsInfo?name=通知公告&id=' + item.id + '" target="_blank">' +
                            '<span style="font-size:18px">' + item.title + '</span></a></li>'
                    });
                    $("#tzc").html(news);
                }
                //通知公告
                carousel.render({
                    elem: '#tz',
                    arrow: 'none',
                    width: '80%', //设置容器宽度
                    anim: 'updown', //轮播切换动画方式
                    height: '40px',
                    indicator: 'none'
                });
            }
        });
        getData(carousel,'政策信息','#zc','#new');
        getData(carousel,'通知公告','#tz','#new1');
        getData(carousel,'工作动态','#gz','#new2');
        getData(carousel,'试点院校风采','#fc','#new3');

    });

    function getData(carousel,columnName,textId,imageId) {
        //左边列表
        $.ajax({
            url: "/jzApi/index/selNewsList",
            type: 'GET',
            data: {
                firstColumn:'证书考试门户',
                columnName:columnName,
                current: 1,
                number:5
            },
            success: function (res) {
                if(res.data.pages==0){
                    $(textId).html('<div class="noData">暂无数据</div>');
                }else{
                    var list = res.data.records;
                    var news = '';
                    list.forEach(function (item, index) {
                        var a='';
                        if(item.thumbnail==''){
                            a='<img src="/img/word.png" />';
                        }else{
                            a='<img src="'+item.thumbnail+'">';
                        }

                        var b = '';
                        if (item.istop == 1){
                            b = '<span class="top">🔝置顶</span>';
                        }
                        news+='<div class="list">' +
                            a +
                            '<label>'+item.createrDate.substring(0,10)+'</label>' +
                            '<a href="/certificate/policyDetail?id=' + item.id + '" target="_blank">'+b+item.title+'</a>' +
                            '</div>';
                    });
                    $(textId).html(news);
                }
            }
        });
        //右边缩略图
        $.ajax({
            url: "/jzApi/index/selNewsThumbnailList",
            type: 'GET',
            data: {
                firstColumn:'证书考试门户',
                columnName:columnName,
                current: 1,
                number:3
            },
            success: function (res) {
                if(res.data.pages==0){
                    $(imageId).html('<div class="noData">暂无数据</div>');
                }else{
                    var list = res.data.records;
                    var zcImage = '';
                    list.forEach(function (item, index) {
                        var a='';
                        zcImage+='<div><a  href="/certificate/policyDetail?id=' + item.id + '">' +
                            '<img src="'+item.thumbnail+'">' +
                            '<p><label style="margin-bottom:28px">'+item.title+'</label></p>' +
                            '</a></div>'
                    });
                    $(imageId).children('div').html(zcImage);
                    carousel.render({
                        elem: imageId,
                        arrow: 'always',
                        width: '100%',
                        height: '305px',
                        anim: 'fade',
                        indicator:'none'
                    });
                }
            }
        });
    }

</script>

</html>